<?

include_once "includes/config.php";
include_once "includes/utilities.php";
OpenDB();

function isChecked($index)
{
    global $diagnostico;
    if (isset($diagnostico[$index]))
        return "checked='checked'";
    return '';
}

function GetSelected($query)
{
    $result = mysql_query($query);
    if ($result && mysql_num_rows($result) > 0)
    {
        for ($i = 0; $i < mysql_num_rows($result); $i++)
        {
            $ret[mysql_result($result, $i)] = true;
        }
        return $ret;
    }
    else
        return false;
}

$codigo = mysql_real_escape_string($_GET["codigo"]);
$diagnostico = GetSelected("select id_desc_microscopica from template_pap_desc_microscopica where codigo = '" . $codigo."'");
include "papStep1.php";
include "papStep2.php";
include "papStep3.php";
?>
